//第一种
const fs = require('fs').promises

//回调改为async
const { promisify } = require('util')
;(async () => {
  const fs = require('fs')
  const { promisify } = require('util')
  const readFile = promisify(fs.readFile)
  const data = await readFile('./index.js')
  console.log('data', data.toString())
})()
